package com.example.xd.tuiliu_test.videoplayer.sample;

import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

import androidx.appcompat.app.AppCompatActivity;

import com.example.xd.tuiliu_test.rtmp.PushStreamActivity;
import com.example.xd.tuiliu_test.R;
import com.example.xd.tuiliu_test.videoplayer.model.VideoModel;
import com.example.xd.tuiliu_test.videoplayer.widget.NoControllerPlayerView;


public class Sample4Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.player_sample_main4);
        NoControllerPlayerView playerView = findViewById(R.id.no_ui_player);
        playerView.getVideoPicImageView().setImageResource(R.drawable.pic);//设置首帧
        VideoModel videoModel = new VideoModel(PushStreamActivity.rtmpUrl, "标清");
        videoModel.autoPlay = true;//设置完播放源后是否自动播放
        playerView.setVideoModel(videoModel);
    }
}
